package fr.emse.tatiana.scoresheetvisualisation.actions;

import org.eclipse.gef.internal.GEFMessages;
import org.eclipse.gef.internal.InternalImages;
import org.eclipse.jface.action.Action;
import org.eclipse.ui.part.EditorPart;

import fr.emse.tatiana.scoresheetvisualisation.ReplayableModelPart;




public class ZoomInXAction extends Action {

	EditorPart part;	

	/**
	 * Constructor for ZoomInAction.
	 * @param zoomManager the zoom manager
	 */
	public ZoomInXAction(EditorPart part) {
		super(GEFMessages.ZoomIn_Label, InternalImages.DESC_ZOOM_IN);
		this.part = part;
		setToolTipText(GEFMessages.ZoomIn_Tooltip);
		setId("fr.emse.tatiana.zoomin");
		setActionDefinitionId("fr.emse.tatiana.zoomin");
	}

	/**
	 * @see org.eclipse.jface.action.IAction#run()
	 */
	@Override
	public void run() {
		((ReplayableModelPart)part.getAdapter(ReplayableModelPart.class)).zoomIn();
	}


}
